/**
 * ------------------------------------------------------------------------------------------
 * Copyright (c): Company, 2012 This software is the
 * proprietary information of FHWS, Würzburg All Right Reserved.
 * ------------------------------------------------------------------------------------------
 *
 *
 * @project: Vorlesungplan
 * @copyright FHWS 2012
 * @link       http://mussnocheingeragenwerden.de
 * @package    tt.model
 *
 * SVN revision information:
 *
 * @version $Rev$:
 * @author $Author$:
 * @date $Date$:
 */

package tt.model;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement;

@Entity
@Table(name = "general")
@XmlRootElement
@NamedQueries(
{
   @NamedQuery(name = "General.findAll", query = "SELECT g FROM General g"),
   @NamedQuery(name = "General.findByIdgeneral", query = "SELECT g FROM General g WHERE g.idgeneral = :idgeneral"),
   @NamedQuery(name = "General.findBySemesterstart", query = "SELECT g FROM General g WHERE g.semesterstart = :semesterstart"),
   @NamedQuery(name = "General.findBySemesterend", query = "SELECT g FROM General g WHERE g.semesterend = :semesterend"),
   @NamedQuery(name = "General.findByExamstart", query = "SELECT g FROM General g WHERE g.examstart = :examstart")
})
public class General implements Serializable
{

   private static final long serialVersionUID = 1L;
   @Id
   @Basic(optional = false)
   @NotNull
   @Column(name = "idgeneral")
   private Integer idgeneral;
   @Column(name = "semesterstart")
   @Temporal(TemporalType.DATE)
   private Date semesterstart;
   @Column(name = "semesterend")
   @Temporal(TemporalType.DATE)
   private Date semesterend;
   @Column(name = "examstart")
   @Temporal(TemporalType.DATE)
   private Date examstart;

   public General()
   {
   }

   public General(Integer idgeneral)
   {
      this.idgeneral = idgeneral;
   }

   public Integer getIdgeneral()
   {
      return idgeneral;
   }

   public void setIdgeneral(Integer idgeneral)
   {
      this.idgeneral = idgeneral;
   }

   public Date getSemesterstart()
   {
      return semesterstart;
   }

   public void setSemesterstart(Date semesterstart)
   {
      this.semesterstart = semesterstart;
   }

   public Date getSemesterend()
   {
      return semesterend;
   }

   public void setSemesterend(Date semesterend)
   {
      this.semesterend = semesterend;
   }

   public Date getExamstart()
   {
      return examstart;
   }

   public void setExamstart(Date examstart)
   {
      this.examstart = examstart;
   }

   @Override
   public int hashCode()
   {
      int hash = 0;
      hash += (idgeneral != null ? idgeneral.hashCode() : 0);
      return hash;
   }

   @Override
   public boolean equals(Object object)
   {
      // TODO: Warning - this method won't work in the case the id fields are not set
      if (!(object instanceof General))
      {
         return false;
      }
      General other = (General) object;
      if ((this.idgeneral == null && other.idgeneral != null) || (this.idgeneral != null && !this.idgeneral.equals(other.idgeneral)))
      {
         return false;
      }
      return true;
   }

   @Override
   public String toString()
   {
      return "tt.model.General[ idgeneral=" + idgeneral + " ]";
   }
}
